{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <!-- 针对于手机端的页面的设置 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>用户信息</title>
    <!-- 加载外面的css  bootstrap加载 -->
    <link type="text/css" href="{% static 'css/bootstrap.css' %}" rel="stylesheet"/>
</head>
<body style="text-align: center">
{{ teacher_data.name }}<br>
{{ teacher_data.nextpage }}<br>
<h1 align="center">用户信息</h1>
<hr>
<table class="table table-hover table-bordered" style="text-align: center">
    <tr align="center">
        <td>id</td>
        <td>用户姓名</td>
        <td>用户性别</td>
        <td>用户身高</td>
        <td>用户电话</td>
        <td>操作</td>
    </tr>
    {% for userelement in user_data.v_user_list %}
    <tr align="center">
        <td>{{userelement.v_user_id}}</td>
        <td>{{userelement.v_user_name}}</td>
        <td>{{userelement.v_user_sex}}</td>
        <td>{{userelement.v_user_height}}</td>
        <td>{{userelement.v_tel}}</td>
        <td>
            <a href="/app01/updateuserpage/?id={{userelement.v_user_id}}">更新</a>|
            <a href="/app01/deleteuser/?id={{userelement.v_user_id}}" onclick="return method01()">删除</a>
        </td>
    </tr>
    {% endfor %}
</table>
<div>
    共{{ user_data.m_gettotalpagenumber }}页&nbsp;&nbsp;
    当前页：{{ user_data.v_currentpage }}&nbsp;&nbsp;
<a href="/app01/getusers/{{ 1 }}">首页</a>&nbsp;&nbsp;
<a href="/app01/getusers/{{ user_data.m_getprepageno }}">上一页</a>&nbsp;&nbsp;
<a href="/app01/getusers/1">1</a>
<a href="/app01/getusers/2">2</a>
<a href="/app01/getusers/3">3</a>
<a href="/app01/getusers/4">4</a>
<a href="/app01/getusers/5">5</a>
<a href="/app01/getusers/6">6</a>&nbsp;&nbsp;
<a href="/app01/getusers/{{ user_data.m_getnextpageno }}">下一页</a>&nbsp;&nbsp;
<a href="/app01/getusers/{{ user_data.m_gettotalpagenumber }}">尾页</a>

</div>

<hr>
<a href="/app01/adduserpage/" style="margin-left: 50%">添加用户</a>
<script type="text/javascript">
    function method01(){
        var_v_result=window.confirm("确定要删除该条记录吗？")
        return var_v_result
    }
</script>
    <!-- jquery要放在bootstrap之前 -->
    <script type="text/javascript" src="{% static 'js/jquery-3.3.1.js' %}"></script>
    <script type="text/javascript" src="{% static 'js/bootstrap.js' %}"></script>
</body>
</html>